home *** CD-ROM | disk | FTP | other *** search
-
-
- /* Copyright (c) 1993-1996 Algorithms Corporation */
- /* All rights reserved. */
-
-
-
-
- /* This file automatically generated by dpp - do not edit */
-
- #define DPP_STRATEGY 2
- #define DPP_FASTWIDE 0
-
-
-
- #line 13 "behavior.d"
- #include "kernels.h"
-
- #define CLASS Behavior_c
- #define ivType Behavior_iv_t
-
- #include "generics.h"
-
- object Behavior_c;
-
- #include "behavior.iv"
-
-
-
- #line 64 "behavior.d"
- imeth char * Behavior_im_gName(object self)
- { Behavior_iv_t *iv = GetIVs(Behavior, self);
- return iv->name;
- }
-
- imeth objrtn Behavior_im_gDontCollect(object self)
- { Behavior_iv_t *iv = GetIVs(Behavior, self);
- iv->ncg = 1;
- return self;
- }
-
- imeth int Behavior_im_gTrace(object self, int mode)
- { Behavior_iv_t *iv = GetIVs(Behavior, self);
- int pmode = iv->trace;
- iv->trace = mode;
- return pmode;
- }
-
- imeth objrtn Behavior_im_gMarkingMethod(object self, ofun mf)
- { Behavior_iv_t *iv = GetIVs(Behavior, self);
- iv->markfun = mf;
- return self;
- }
-
- imeth void Behavior_im_gDoesNotImplement(object self, object gen)
- { Behavior_iv_t *iv = GetIVs(Behavior, self);
- char buf[100];
-
- ChkArgTyp(gen, 2, GenericFunction);
- if (IsaClass(self))
- sprintf(buf, "\nInstance of class %s doesn't respond to generic %s\n",
- iv->name, gName(gen));
- else
- sprintf(buf, "\nClass %s doesn't respond to generic %s\n",
- iv->name, gName(gen));
- gError(Dynace, buf);
- }
-
- imeth int Behavior_im_gIsKindOf(object self, object cls2)
- { Behavior_iv_t *iv = GetIVs(Behavior, self);
- int i;
-
-
-
- if (self == cls2)
- return 1;
-
-
-
- for (i=0 ; i < iv->n_direct_superclasses ; ++i)
- if (gIsKindOf(iv->direct_superclasses[i], cls2))
- return 1;
- return 0;
- }
-
- #ifndef NOCLASSLIB
-
- imeth objrtn Behavior_im_gStringRep(object self)
- { Behavior_iv_t *iv = GetIVs(Behavior, self);
- object s, t;
-
- t = gStringRepValue(self);
- s = vBuild(String, "Class ", iv->name, " [ ", t, " ]\n", NULL);
- gDispose(t);
- return s;
- }
-
- imeth objrtn Behavior_im_gStringRepValue(object self)
- {
- return vSprintf(String, "<%8.8lx>", self);
- }
-
- imeth objrtn Behavior_im_gSuperClasses(object self)
- { Behavior_iv_t *iv = GetIVs(Behavior, self);
- int i;
- object lst;
-
- lst = gNew(LinkObject);
-
- for (i=0 ; i < iv->n_direct_superclasses ; ++i)
- gAddFirst(lst, iv->direct_superclasses[i]);
- return lst;
- }
-
- imeth objrtn Behavior_im_gSubClasses(object self)
- { Behavior_iv_t *iv = GetIVs(Behavior, self);
- object_list *sc;
- object lst;
-
- lst = gNew(LinkObject);
-
- for (sc=iv->direct_subclasses ; sc ; sc=sc->next)
- gAddFirst(lst, sc->obj);
- return lst;
- }
-
- #endif
-
- imeth objrtn Behavior_im_gCopy(object self)
- {
- return gShouldNotImplement(self, "gCopy/gDeepCopy");
- }
-
- objrtn Behavior_initialize(void)
- {
- static int done = 0;
-
-
-
-
- if (done)
- return Behavior_c;
-
- done = 1;
-
-
-
- iMethodFor(Behavior, gName, Behavior_im_gName);
- iMethodFor(Behavior, gDontCollect, Behavior_im_gDontCollect);
- iMethodFor(Behavior, gTrace, Behavior_im_gTrace);
- iMethodFor(Behavior, gMarkingMethod, Behavior_im_gMarkingMethod);
- iMethodFor(Behavior, gDoesNotImplement, Behavior_im_gDoesNotImplement);
- iMethodFor(Behavior, gIsKindOf, Behavior_im_gIsKindOf);
- iMethodFor(Behavior, gCopy, Behavior_im_gCopy);
- iMethodFor(Behavior, gDeepCopy, Behavior_im_gCopy);
-
- #ifndef NOCLASSLIB
- iMethodFor(Behavior, gStringRep, Behavior_im_gStringRep);
- iMethodFor(Behavior, gStringRepValue, Behavior_im_gStringRepValue);
- iMethodFor(Behavior, gSuperClasses, Behavior_im_gSuperClasses);
- iMethodFor(Behavior, gSubClasses, Behavior_im_gSubClasses);
- #endif
- return Behavior_c;
- }
-
- #if 0
-
- imeth objrtn Behavior_im_gNew(object self)
-
- #line 201 "behavior.d"
- {}
-
-
- #line 202 "behavior.d"
- ivmeth objrtn Behavior_ivm_vNew(object self, va_list _rest_)
-
- #line 202 "behavior.d"
- {}
-
- #line 181 "behavior.c"
-
- static objrtn Behavior_ifm_vNew(object self, ...)
- {
- va_list _rest_;
- va_start(_rest_, self);
- return Behavior_ivm_vNew(self, _rest_);
- }
-
-
-
- #line 203 "behavior.d"
- imeth objrtn Behavior_im_gStackAlloc(object self, void *p)
-
- #line 203 "behavior.d"
- {}
-
-
- #line 204 "behavior.d"
- imeth ofun Behavior_im_gFindMethod(object self, object generic, int lev)
-
- #line 204 "behavior.d"
- {}
-
-
- #line 205 "behavior.d"
- imeth objrtn Behavior_im_gFindMethodObject(object self, object generic, int lev)
-
- #line 205 "behavior.d"
- {}
-
-
- #line 206 "behavior.d"
- imeth int Behavior_im_gInstanceSize(object self)
-
- #line 206 "behavior.d"
- {}
-
- #endif
-